package com.ykq.controller;

import com.ykq.entity.Class;
import com.ykq.mapper.ClassMapper;
import com.ykq.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: 闫克起
 * @Description:
 * @Date: Create in 9:24 2024/10/17
 */
@RestController
@RequestMapping("/clazz")
public class ClazzController {

    @Autowired
    private ClassMapper classMapper;

    @GetMapping("/list")
    public R list(){
        List<Class> list = classMapper.selectAll(); //调用dao中查询所有班级信息得到功能
        return R.ok(list);
    }
}
